package com.Set;

import java.util.LinkedHashSet;

/**
 * LinkedHashSet特点：有序、不重复、无索引
 * 一般Linked集合都是有序的
 */

public class LinkedHashSetDemo1 {
    public static void main(String[] args) {
        LinkedHashSet<String> linkedHashSet=new LinkedHashSet<>();
        linkedHashSet.add("java");
        linkedHashSet.add("java");
        linkedHashSet.add("python");
        linkedHashSet.add("python");
        linkedHashSet.add("scala");
        linkedHashSet.add("scala");
        linkedHashSet.add("SpringBoot");
        linkedHashSet.add("SpringBoot");
        System.out.println(linkedHashSet);
        //[java, python, scala, SpringBoot]
    }

}
